<%@page import="com.sfd.entity.Amercement"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" />
		<title>图书档案</title>
		<link rel="stylesheet" type="text/css" href="../../skin/css/base.css">
			<script type="text/javascript" src="../../js/jquery.js">
</script>
			<script type="text/javascript" src="../../js/thickbox_plus.js">
</script>
			<script src="../../js/dt.js">
</script>
			<link rel="stylesheet" type="text/css" href="../../css/thickbox.css" />
<style type="text/css">
	a{
		text-decoration:none;
	}
</style>
<script language="javascript">
function viewArc(aid) {
	if (aid == 0)
		aid = getOneItem();
	window.open("archives.asp?aid=" + aid + "&action=viewArchives");
}
function editArc(aid) {
	if (aid == 0)
		aid = getOneItem();
	location = "archives.asp?aid=" + aid + "&action=editArchives";
}
function updateArc(aid) {
	location.reload();
}
function checkArc(aid) {
	var qstr = getCheckboxItem();
	if (aid == 0)
		aid = getOneItem();
	location = "archives.asp?aid=" + aid + "&action=checkArchives&qstr=" + qstr
			+ "";
}
function moveArc(aid) {
	var qstr = getCheckboxItem();
	if (aid == 0)
		aid = getOneItem();
	location = "archives.asp?aid=" + aid + "&action=moveArchives&qstr=" + qstr
			+ "";
}
function adArc(aid) {
	var qstr = getCheckboxItem();
	if (aid == 0)
		aid = getOneItem();
	location = "archives.asp?aid=" + aid + "&action=commendArchives&qstr="
			+ qstr + "";
}
function delArc(aid) {
	var qstr = getCheckboxItem();
	if (aid == 0)
		aid = getOneItem();
	location = "archives.asp?aid=" + aid + "&action=delArchives&qstr=" + qstr
			+ "";
}

//获得选中文件的文件名
function getCheckboxItem() {
	var allSel = "";
	if (document.form2.id.value)
		return document.form2.id.value;
	for (i = 0; i < document.form2.id.length; i++) {
		if (document.form2.id[i].checked) {
			if (allSel == "")
				allSel = document.form2.id[i].value;
			else
				allSel = allSel + "`" + document.form2.id[i].value;
		}
	}
	return allSel;
}

//获得选中其中一个的id
function getOneItem() {
	var allSel = "";
	if (document.form2.id.value)
		return document.form2.id.value;
	for (i = 0; i < document.form2.id.length; i++) {
		if (document.form2.id[i].checked) {
			allSel = document.form2.id[i].value;
			break;
		}
	}
	return allSel;
}
function selAll() {
	for (i = 0; i < document.form2.id.length; i++) {
		if (!document.form2.id[i].checked) {
			document.form2.id[i].checked = true;
		}
	}
}
function isone() {
	var count = 0;
	for (i = 0; i < document.form2.id.length; i++) {
		if (document.form2.id[i].checked) {
			count++;

		}
	}
	if (count < 1) {
		alert("没有选择数据！");
		return;
	}

	if (count > 1) {
		alert("只可选择一条信息");
		return;
	} else {
		location = "roleset.html?height=400;width=300";
	}
}
function noone() {
	var count = 0;
	for (i = 0; i < document.form2.id.length; i++) {
		if (document.form2.id[i].checked) {
			count++;
		}
	}
	if (count == 0) {
		alert("您没有选择删除目标！");
		return;
	} else {
		alert("您已成功删除目标！");
		location.reload();

	}
}
function noSelAll() {
	for (i = 0; i < document.form2.id.length; i++) {
		if (document.form2.id[i].checked) {
			document.form2.id[i].checked = false;
		}
	}
}
</script>
			<style type="text/css">
.t1 {
	text-align: center;
}

.STYLE2 {
	font-size: 16px
}
</style>
	</head>
	<body bgcolor="#009edb" leftmargin="0"
		background='../../skin/images/allbg.gif'>

		<!--  快速转换位置按钮  -->
		<!--  内容列表   -->
		<form name="form2">

			<table width="100%" border="0" cellpadding="2" cellspacing="1"
				bgcolor="#D1DDAA" align="center" style="margin-top: 8px">
				<tr bgcolor="#DAE0F1">
					<td height="24" colspan="8" align="center"
						background="../../skin/images/tbg.gif">
						<span class="t1">&nbsp;<span class="STYLE2">罚款信息表</span> </span>
					</td>
				</tr>
				<tr align="center" bgcolor="#FAFAF1" height="22">

					<td width="8%" align="center">
						<span class="t1">编号</span>
					</td>
					<td width="10%" align="center">
						<span class="t1">借阅记录编号</span>
					</td>
					<td width="10%" align="center">
						<span class="t1">学生学号</span>
					</td>
					<td width="10%" align="center">
						<span class="t1">借书时间</span>
					</td>
					<td width="10%" align="center">
						<span class="t1">罚款金额</span>
					</td>
					<td width="5%" align="center">
						<span class="t1">是否缴纳</span>
					</td>
					<td width="11%" align="center">
						<span class="t1">缴纳时间</span>
					</td>
				</tr>

				<%
 		List amercements = (List)request.getAttribute("bills");
		
		for(int i=0; i<amercements.size();i++){
			
			Amercement amercement = (Amercement)amercements.get(i);
%>

				<tr align='center' bgcolor="#FFFFFF"
					onMouseMove="javascript:this.bgColor='#149ff8';"
					onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
					<td align="center">
						<span class="t1"><%=amercement.getAmerceNo() %></span>
					</td>
					<td align="center"><%=amercement.getBorrowNo() %></td>
					<td align="center"><%=amercement.getStudentId() %></td>
					<td align="center"><%=amercement.getStartTime() %></td>
					<td align="center"><%=amercement.getMulct() %></td>
					<%
					if(amercement.getPay()==0){
					%>
					<td align="center">未付款</td>
					<%
					}else {
					%>
					<td align="center">已付款</td>
					<%
					}
					if(amercement.getPayTime()==null){
				%>
					<td align="center">
						—
					</td>
					<%
					}else {
				%>
					<td align="center">
						<span class="t1"><%=amercement.getPayTime()%></span>
					</td>
					<%
					}
					%>
				</tr>
				<%
	}

%>


				<tr bgcolor="#FAFAF1">
					<td height="28" colspan="8" align="center">
						<span class="t1">&nbsp; <a href="javascript:updateArc()"
							class="coolbg">&nbsp;更新&nbsp;</a> <a
							href="javascript:updateArc(0)" class="coolbg">&nbsp;上一页&nbsp;</a>
							<a href="javascript:updateArc(0)" class="coolbg">&nbsp;下一页&nbsp;</a>
				</tr>
				<tr align="right" bgcolor="#EEF4EA">
					<td height="36" colspan="8" align="center">
						<span class="t1"> <!--翻页代码 --> </span>
					</td>
				</tr>
			</table>

		</form>

		<span class="t1"> <!--  搜索表单  --> </span>
	</body>
</html>
